const SSLColumnFormat = {
    /**
     * @description SSL数据标准字段.
     */
    _SSLEntity: {
        id: '',
        domain: '',
        provider: '',
        expire_date: '',
        server_name: ''
    },
    /**
     * @description Tencent返回数据字段与标准字段映射关系.
     */
    TencentToStandardMap : {
        id: 'CertificateId',
        domain: 'Domain',
        provider: 'ProductZhName',
        expire_date: 'CertEndTime'
    },

    /**
     * @description 格式化数据.
     * @param dataList
     * @param map
     * @returns {*[]}
     */
    formatList(dataList, map) {
        let list = []
        for (let i = 0; i < dataList.length; i++) {
            let data = dataList[i]
            let newData = {}
            for (let key in map) {
                newData[key] = data[map[key]]
            }
            list.push(newData)
        }
        return list
    }
}

export default SSLColumnFormat